package com.treasure.mall.biz.entity.life;

import com.treasure.mall.biz.entity.BasePO;
import com.treasure.mall.biz.entity.user.UserPO;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 
 * <p>
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.entity.life
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/10/13 3:22 下午
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * 
 */
@Entity
@Table(name = "zb_shop_reservation_record")
@Setter
@Getter
public class ShopReservationRecordsPO extends BasePO {

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 预约的用户
     */
    @OneToOne
    @JoinColumn(name = "user_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private UserPO user;

    /**
     * 预约店铺
     */
    @OneToOne
    @JoinColumn(name = "rel_shop_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private ShopPO shop;
}
